Embodiments of the present invention relate to methods of storing image data in memory during image processing and to systems that perform such methods.
A conventional laser printer generally includes a print engine, an input interface for receiving data to be printed, and a processor that supplies data to the print engine in response to the received input data. The processor manages a modest internal memory for buffering input data, for translating input data to provide a signal for the print engine, and for paper jam recovery. The input data conventionally includes instructions conforming to a page description language (PDL), such as PCL printer control language, marketed by Hewlett Packard, or the POSTSCRIPT page description language, marketed by Adobe Systems. PCL and POSTSCRIPT are trademarks of the respective aforementioned companies. Some input data in a PDL format may require temporary storage in the printer to facilitate operation on such input data as a whole. In the process of providing a signal to the print engine, input data in a PDL format is conventionally translated to a bit map format. Data in a bit map format may also require temporary storage in the printer to facilitate producing a scan signal to the print engine. When a portion of an image in a bit map format is needed more than once on the same page, memory management routines conventionally require temporary storage of the repeated bit map data for access at different times. Paper jam recovery is an attractive feature of a printer that operates as a page printer. A page printer prints respective pages on sequential separate sheets of paper. Such a printer maintains a complete description of each page until the sheet for that page exits the printer. If a paper jam should arise before the sheet exits the printer, the page is reprinted as soon as the jam is cleared without the printer receiving again the input data in a PDL format.
The market for printers imposes economic constraints that limit the amount of memory available to the processor for the functions discussed above and other communication and image processing tasks. In addition, demand for low cost, high throughput, high resolution page printers continues to increase. A continuous high throughput page printing rate is difficult to achieve with an economically limited memory size. The page printing rate degrades when processing is stopped by a memory-out condition. Such a condition can arise when an excessive amount of data in a bit map format is being retained. The page printing rate may also be degraded when data in a bit map format is discarded (to free memory demanded for other purposes and then recreated when next needed. In this later case, processing time increases to produce the image to be printed. Such processing time directly degrades the page printing rate.
The interruption in processing or increased processing described above may have adverse effects on the computer system to which such a printer is connected. For example, an interruption in processing may interrupt network communication between a computer and the printer. Delays in transmission of input data and/or retransmission of incompletely processed input data consumes network resources and computing resources that may otherwise have been effectively applied to other purposes of the computer system.
In view of the problems described above and related problems that consequently become apparent in the art of image processing systems, the need remains for methods and apparatus for managing memory used for image processing.
An imaging system according to an embodiment of the present invention includes a memory and a processor. The processor performs a method for managing utilization of the memory. The method includes the following steps in any order: (a) forming a decomposition of provided graphic elements where the decomposition includes graphic primitives and the decomposition occupies a first portion of the memory; (b) determining an estimate of a system resource utilization that would be incurred with a step of rendering; (c) determining in accordance with the estimate, whether to postpone performance of the step of rendering; and (d) rendering the graphic primitives to form bit map data that occupies a second portion of the memory, thereby permitting reuse of the first portion of the memory.
By forming a decomposition of the image in graphic primitives, an estimate of memory utilization and/or processor utilization may be used to defer rendering when immediate rendering would consequently commit more memory to storing the rendered result or involve more processing time. System performance improves. In a printer such system performance includes increased ability to print complex images, faster page printing rate, and the ability meet such printing performance goals with less memory.
When the graphic primitives are of a variety of types, calculating the estimated amount of memory as a sum of a first expression in accordance with a first type and a second expression in accordance with a second type provides a more accurate estimate of system resource utilization, especially memory utilization.
In a variation, the step of determining the estimate further includes the following steps in any order: (e) determining an estimated amount of memory for the second portion; (f) forming a difference between a size of the first portion and the estimated amount of memory for the second portion; and (g) if the difference exceeds a predetermined threshold value, proceeding to perform the step of determining whether to postpone; and otherwise determining the estimate in accordance with a processing duration associated with the step of rendering.
By determining whether to postpone rendering on the basis of memory utilization, a calculation of processing duration may be avoided for those cases where a difference in memory utilization is significant.
Another embodiment according to various aspects of the present invention, provides a printer which includes an interface, a processor, and a print engine. The interface receives a first description of a page to be printed. The first description conforms to a page description language. The processor performs a method that includes the following steps in any order: (a) deriving a second description of a portion of the page from a portion of the first description; (b) assessing a processor resource utilization with respect to deriving from the second description a third description in a bit map format of the portion of the page; (c) deriving the third description when storage of the third description instead of the second description would improve the resource utilization; and (d) deriving scan line data from the third description. The print engine prints the page in accordance with the scan line data.
By improving the processor resource utilization, for example, as in reducing memory requirements during processing of a page, a printer with a limited amount of memory can print more complex pages and sustain a faster page printing rate. Use of the present invention in a printer allows memory not used for bit map storage to be used for any other purpose and so generally improves printer capability.
In yet another embodiment, a processor is formed on an integrated circuit substrate to perform a method including the following steps in any order: (a) receiving a first description of a tile; (b) deriving a second description of the tile, the second description for storage in a portion of provided memory; (c) assessing a resource utilization with respect to deriving from the second description a third description in a bit map format of the tile; and (d) deriving the third description when storage in the memory of the third description instead of the second description would improve the resource utilization.